<template>
  <el-form :model="tablePrepayment">
    <el-form-item>
      <el-col
        :span="14"
        class="el-col-offset-2"
      ><el-input-number
        v-model="tablePrepayment.val"
        :controls="false"
        :precision="2"
        clearable
      /></el-col>
    </el-form-item>

  </el-form>
</template>

<script>
export default {
  name: 'CommodityPrepaymentPriceValue',
  props: {
    index: {
      type: Number,
      required: true
    },
    tablePrice: {
      type: Number,
      required: false,
      default: function() {
        return 0
      }
    }
  },
  data() {
    return {
      tablePrepayment: {
        val: ''
      }
    }
  },
  mounted() {
    if (this.tablePrice) {
      this.tablePrepayment.val = this.tablePrice
    }
  },
  methods: {
    getData() {
      const vm = this
      return vm.tablePrepayment.val
    }
  }
}
</script>

<style scoped>
</style>
